import axios from '@/utils/request'

// 获取部门列表
export const getDepartListApi = () => {
  return axios({
    url: '/company/department'
  })
}
// 删除部门
export const delDepartListApi = (id) => {
  return axios({
    method: 'delete',
    url: `/company/department/${id}`
  })
}
// 添加部门
export const addDepartApi = (data) => {
  return axios({
    method: 'post',
    url: '/company/department',
    data
  })
}
// 获取部门的负责人
export const getDepartSimpleApi = () => {
  return axios({
    url: '/sys/user/simple'
  })
}
// 获取数据
export const updateDepartApi = (id) => {
  return axios({
    url: `/company/department/${id}`
  })
}
// 修改部门信息
export const getupdateDepartApi = (data) => {
  return axios({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
